import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-03-16
 * Time: 17:07
 */
@WebServlet("/postParameter")
public class PostParamterServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//       String studentId = req.getParameter("studentId");
//       String classId = req.getParameter("classId");
//        resp.setContentType("text/html; charset=utf-8");
//        resp.setContentType("text/html; charset=utf8");
//        resp.getWriter().write("studentId=" + studentId +"classId = "    + classId);

          String username = req.getParameter("uersname");
          String password = req.getParameter("password");
          resp.setContentType("text/html; charset=utf8");
          resp.getWriter().write(username + password);
    }
}
